
import { Map, yearsNum, HealthIndex, HealthIndextrendchart, todayNum, todayWether, wordClonds, Radar, StiffWoodTrend, Age, doctorNum } from "../api/allHttp"

const IndexModel = {
  namespace: 'index',

  state: {
    name: '',
    map: []
  },

  effects: {
    *cityH({ payload }, { call, put }) {
      const res = yield call(Map, "上海")
      yield put({
        type: "shanghai",
        payload: res.data
      })
    },
    *cityC() {
      const res = yield call(Map, "长三角")
      yield put({
        type: "chang",
        payload: res.data
      })
    }
  },
  reducers: {
    //长三角
    chang(state, action) {
      state.map = action.payload
      return { ...state }
    },
    //上海
    shanghai(state, action) {
      state.map = action.payload
      return { ...state }
    },
    //雷达



    //男女趋势


    //不同年龄段指数


    //2021体检

    //健康体检员

    //医护人员

    //今日生成报表数

    //词云

    //历年健康趋势

    //.....
  }
};

export default IndexModel;